<template>
  <div class="cell">
    <div class="orderContainer">
      <van-cell :title="description"
                is-link
                value="内容"/>
      <div class="orderContainer_detail">
        <div class="img_container">
          <img src="../../assets/img/消息中心.png" alt="">
        </div>
        <div class="info">
          <p>公司: {{ record.cusName }}</p>
          <p>下单时间: </p>&nbsp;
          <p>下单人: </p>&nbsp;
        </div>
      </div>
    </div>
    <div class="actions">
      <van-button
          type="info"
          :plain="record.status===30 || record.status===20"
          round
          :color="(record.status===0 || record.status===10) ? 'rgb(12,54,147)' : 'rgb(248,204,85)'"
      >{{ status[record.status] }}
      </van-button>
    </div>

  </div>
</template>

<script>
// import {SendOrder} from "@/request/api";

export default {
  data() {
    return {
      //组件展示数据
      description: "",
      img_url: "",
      //组件详细数据
      status: {
        0: "未发货",
        10: "未收货",
        20: "未评价",
        30: "已评价"
      },
    }
  },
  props: ["record"],
  methods: {
    // 发送点击事件
    // clicked(status) {
    //   switch (status) {
    //     case 0:
    //       SendOrder({
    //         serialNo: this.record.serialNo,
    //         receiver: this.record.receiver,
    //         linkPhone: this.record.linkPhone,
    //         address: this.record.address,
    //         logisticsCode: this.record.logisticsCode
    //       }).then(res => {
    //         console.log("发货请求", res);
    //       });
    //       break;
    //     case 10:
    //       break;
    //     case 20:
    //       break;
    //     case 30:
    //       break;
    //   }
    // }
  }

}
</script>

<style scoped lang="less">
.cell {
  background-color: #fff;
  margin-top: 15px;
}

.orderContainer {
  box-sizing: border-box;
  padding: 0.15rem 0.2rem 0.1rem;
  margin: 0 10px;

  p {
    line-height: 0.30rem;
    color: #b0b0b0
  }
}

.actions {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 10px;

  .van-button {
    margin-right: 20px;
  }
}

.orderContainer_detail {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  border-bottom: dashed 1px #cfcfcf;
  border-top: dashed 1px #cfcfcf;

  .info {
    padding: 15px 0 15px 15px;
  }

  .img_container {
    img {
      padding-top: 25px;
    }
  }
}
</style>